<?php

    if (! defined('SIMPLE_TEST')) {
        define('SIMPLE_TEST', '../simpletest/');
    }
    require_once(SIMPLE_TEST . 'autorun.php');

    include '../Include/Include.php';


class AluminioConsultarLogicaTest extends UnitTestCase {

    public function AluminioConsultarLogicaTest() {
        $this->UnitTestCase();
    }

    public function testhacer() {
        $DBConn = null;
        $conexion = new conexion();
        $DBConn = $conexion->setConnect();
        $DBConn->consulta( "INSERT INTO costo_aluminio
                            VALUES (-1,'Prueba Aluminio',
                            'Tipo accesorio prueba',10,20,
                            30,40,1)" );

        $aluminioConsultarLogicaTest = new AluminioConsultarLogica( -1 );
        $aluminioConsulta = $aluminioConsultarLogicaTest->hacer();

        $this->assertEqual( $aluminioConsulta->getNombre(), 'Prueba Aluminio' );
        $this->assertEqual( $aluminioConsulta->getTipo(), 'Tipo accesorio prueba' );

        $DBConn->consulta("DELETE FROM costo_aluminio
                          WHERE CAL_ID = -1" );

    }
}

?>
